<div class="table-margin">
    <div class="table-header">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <td class="w5 text-center">
                        <input type="checkbox" #event (click)="selectAll()" [checked]="seletedIds.length == tabVal.length&&tabVal.length != 0">
                    </td>
                    <td class="w5 text-center">序号</td>
                    <td class="w10 text-left max-w" title="机构名称">机构名称</td>
                    <td class="w10 text-left max-w" title="机构类型">机构类型</td>
                    <td class="w10 text-left max-w" title="服务类型">服务类型</td>
                    
                    <td class="w10 text-left max-w" title="性质">性质</td>
                    <td class="w10 text-left max-w" title="行业">行业</td>
                    <td class="w15 text-left max-w" title="地区(省/市)">地区(省/市)</td>
                    <!-- <td class="w15 text-left max-w" title="升级状态">升级状态</td> -->
                    <td class="w10 text-left max-w" title="状态">状态</td>
                    <td class="w15 text-left" >操作</td>
                </tr>
            </thead>
        </table>
    </div>
    <div class="table-body">
        <table class="table table-bordered table-header">
            <tbody>
                <tr *ngFor="let val of tabVal; let  i = index;" [ngClass]="{'active':i%2!=0}">
                    <td class="w5 text-center">
                        <input type="checkbox" (click)="selectThis(val.institutionId,val)" [checked]="isSelected(val.institutionId)" >
                        <!-- #event (click)="chose(event.checked, val.institutionId, val.length)" [checked]="isChose"> -->
                    </td>
                    <td class="w5 text-center">{{ tableNumber+i+1 }}</td>
                    <td class="w10 text-left max-w" title="{{val.institutionName }}">{{ val.institutionName }}</td>
                    <td class="w10 text-left max-w" title="{{val.institutionType }}">
                        <span *ngIf="val.institutionType==0">客户机构</span>
                        <span *ngIf="val.institutionType==1">代理商</span>
                        <span *ngIf="val.institutionType==2">应用提供商</span>
                        <span *ngIf="val.institutionType==3">供应商</span>
                    </td>
                    <td class="w10 text-left max-w" title="{{val.jgServerType}}">
                        <span *ngIf="val.jgServerType==0">线上图书馆</span>
                        <span *ngIf="val.jgServerType==1">镜像图书馆</span>
                        <span *ngIf="val.jgServerType==2">线上/镜像图书馆</span>
                    </td>
                    
                    <td class="w10 text-left max-w" title="{{val.nature }}">{{ val.nature }}</td>
                    <td class="w10 text-left max-w" title="{{val.industry }}">{{ val.industry }}</td>
                    <td class="w15 text-left max-w" title="{{ val.province }}/{{ val.city }}">
                        <span *ngIf="val.province">{{ val.province }}</span>
                        <span *ngIf="val.province && val.city">/</span>
                        <span *ngIf="val.city">{{ val.city }}</span>
                    </td>
                    <!-- <td class="w15 text-left max-w" title="{{val.updateStatus}}">
                        <strong class="text-danger" *ngIf="val.updateStatus==0">未下载，未更新</strong>
                        <strong class="text-info" *ngIf="val.updateStatus==1">已下载，未更新</strong>
                        <strong class="text-success" *ngIf="val.updateStatus==2">已下载，已更新</strong>
                    </td> -->
                    <td class="w10 text-left">
                        <strong class="text-success" *ngIf="val.enabled==1">启用</strong>
                        <strong class="text-danger" *ngIf="val.enabled==0">禁用</strong>
                    </td>
                    <td class="w15 text-left icon-td">
                        <span class="btn-i" title="所辖用户" (click)="of(val)" *ngIf="right['institution']['includeUsers']">
                            <img width="16px" height="16px" src="assets/right-product/users.png">
                        </span>
                        <span class="btn-i" title="详情"  (click)="detailsPopup(val)" *ngIf="right['institution']['details']">
                            <img width="14px" height="10px" src="assets/right-product/view.png">
                        </span>
                        <span class="btn-i" title="修改"  (click)="editPopup(val)" *ngIf="right['institution']['update']">
                            <img width="14px" height="14px" src="assets/right-product/edit.png">
                        </span>
                        <!-- <span class="btn-i" title="下载"  (click)="download(val.institutionId)">
                            <img width="14px" height="14px" src="assets/right-product/download.png">
                        </span>
                        <span class="btn-i" title="升级" *ngIf="val.updateStatus==1"  (click)="upgrade(val.institutionId)">
                            <img width="14px" height="14px" src="assets/right-product/upgrade.png">
                        </span> -->
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</div>